<!DOCTYPE html>
<html lang="en">
<head>
[#include "/customer/include/static.htm"]
    <link type="text/css" href="${path}/resources/css/user/safetyCent.css" rel="stylesheet"/>
    <link href="${path}/resources/css/member.css" rel="stylesheet" type="text/css"/>
    <link href="${path}/resources/css/member/main.css" rel="stylesheet" type="text/css"/>
    <link href="${path}/resources/css/member/safety.css" rel="stylesheet" type="text/css"/>
    <script src="${path}/resources/plug/layui/layui.js" type="text/javascript"></script>
    <link href="${path}/resources/plug/layui/css/layui.css" rel="stylesheet" type="text/css"/>
</head>
<body>

[#include "/customer/include/header.ftl"]
[#include "/customer/include/member_menu.ftl"]
<div class="safe-bg">
    <div class="safe-wrap">
        <div class="safe-tab" id="safe-tab">
            <ul>
                <li class="active">账户信息</li>
                <a href="${path}/member/account/bankinfo"> <li>我的银行卡</li></a>
            </ul>
        </div>
        <div class="safe-tab-cont" id="safe-tab-cont">
            <div class="safe-tab-box">
                <div class="safe-progress">
                    <strong>
                        您的账户安全等级
                        [#if ((realName.status)!'')==1  &&  ((email.is_passed)!'')==1]
                        <em class="hig">  </em>
                    [#elseif ((realName.status)!'')==1 ||  ((email.is_passed)!'')==1]
                        <em class="mid">  </em>
                    [#else ]
                        <em class="low">  </em>
                    [/#if]
                    </strong>
                </div>
                <div class="safety-list">
                    <ul>
                        <li>

                           <span><i class="i i-person"></i><b class="b">实名认证</b> </span>

                           [#if ((realName.status)!'')==0]
                               <strong><i class="i-err"></i><b class="b b-ok">认证审核中</b></strong>
                               <em><a href="javascript:void(0)" class="btn1">--</a></em>
                           [#elseif ((realName.status)!'')==1]
                               <strong><i class="i-ok"></i><b class="b b-ok">已认证</b></strong>
                               <em><a href="javascript:void(0)" class="btn1">--</a></em>
                           [#elseif  ((realName.status)!'')==-1 ]
                               <strong><i class="i-err"></i><b class="b b-err">认证失败，重新认证</b></strong>
                               <em> <a id="auth_id" href="javascript:void(0)"  class="btn1">重新认证</a></em>
                           [#else]
                               <strong><i class="i-err"></i><b class="b b-err">未开通</b></strong>
                               <em> <a id="auth_id" href="javascript:void(0)" class="btn1">去认证</a></em>
                           [/#if]
                        </li>

                        <li>
                        [#--   [#if ((mobile.passed)!'')==1 ]--]
                               <span><i class="i i-mobile"></i><b class="b">绑定手机</b></span>
                               <strong><i class="i-ok"></i><b class="b b-ok">已绑定</b></strong>
                               <em><a id="mobileApprove" href="javascript:void(0)" class="btn1">修改</a></em>
                          [#-- [#else]
                               <span><i class="i i-mobile"></i><b class="b">绑定手机</b></span>
                               <strong><i class="i-err"></i><b class="b b-err">未绑定</b></strong>
                               <em><a id="mobileApprove" href="javascript:void(0)" class="btn1">去绑定</a></em>
                           [/#if]--]
                        </li>

                        <li>
                           [#if ((email.is_passed)!'')==1 ]
                               <span><i class="i i-mail"></i><b class="b">绑定邮箱</b></span>
                               <strong><i class="i-ok"></i><b class="b b-ok">已绑定</b></strong>
                               <em><a href="javascript:void(0)" id="emailapprove" class="btn1">修改</a></em>
                           [#else]
                               <span><i class="i i-mail"></i><b class="b">绑定邮箱</b></span>
                               <strong><i class="i-err"></i><b class="b b-err">未认证</b></strong>
                               <em><a href="javascript:void(0)" id="emailapprove" class="btn1">去绑定</a></em>
                           [/#if]
                        </li>


                        <li>
                            <span><i class="i i-loginpass"></i><b class="b">登录密码</b></span>
                            <strong><i class="i-ok"></i><b class="b b-ok">已设置</b></strong>
                            <em><a href="javascript:void(0)" id="loginmodify" class="btn1">修改</a></em>
                        </li>
                        <li id="loginPwd" style="display: none">
                            <div class="ct">
                                <form class="layui-form">
                                    <ul>
                                        <li>
                                            <label class="layui-form-label"> 原始密码： </label>
                                            <div class="layui-input-inline">
                                                <input type="password" name="oldpass" required="" lay-verify="required" placeholder="请输入原密码" autocomplete="off" class="layui-input">
                                            </div>
                                        </li>
                                        <li>
                                            <label class="layui-form-label">输入新密码：</label>
                                            <div class="layui-input-inline">
                                                <input type="password" name="pass1" required="" lay-verify="required" placeholder="请输入新密码" autocomplete="off" class="layui-input">
                                            </div>
                                        </li>
                                        <li>
                                            <label class="layui-form-label">确认新密码： </label>
                                            <div class="layui-input-inline">
                                                <input type="password" name="pass2" required="" lay-verify="required" placeholder="请确认新密码" autocomplete="off" class="layui-input">
                                            </div>
                                        </li>
                                        <li>
                                            <button lay-submit lay-filter="MainForm" class="layui-btn layui-btn-small" style="width: 280px;margin-top:3px;">确认提交</button>
                                        </li>
                                    </ul>
                                </form>
                            </div>
                        </li>

                        <li>
                            <span><i class="i i-tradepass"></i><b class="b">交易密码</b></span>

                            <strong><i class="i-ok"></i><b class="b b-ok">已设置</b></strong>
                            <em><a href="javascript:void(0)" id="paymodify" class="btn1">修改</a>
                                <a href="${path}/member/forget" class="btn1">忘记了？</a>
                            </em>

                        </li>

                        <li id="payPwd" style="display: none">
                            <div class="ct" >
                                <form class="layui-form">
                                    <ul>
                                        <li>
                                            <label class="layui-form-label"> 原始密码： </label>
                                            <div class="layui-input-inline">
                                                <input type="password" name="oldpass" required="" lay-verify="required" placeholder="请输入原密码" autocomplete="off" class="layui-input">
                                            </div>
                                        </li>
                                        <li> <label class="layui-form-label">确认新密码：</label>
                                            <div class="layui-input-inline">
                                                <input type="password" name="pass1" required="" lay-verify="required" placeholder="请输入新密码" autocomplete="off" class="layui-input">
                                            </div>
                                        </li>
                                        <li>
                                            <label class="layui-form-label">确认新密码：</label>
                                            <div class="layui-input-inline">
                                                <input type="password" name="pass2" required="" lay-verify="required" placeholder="请输入新密码" autocomplete="off" class="layui-input">
                                            </div>
                                        </li>
                                        <li>
                                            <button lay-submit lay-filter="paypassForm" class="layui-btn" style="width: 280px;margin-top:3px;">确认提交</button>
                                        </li>
                                    </ul>
                                </form>
                            </div>
                        </li>

                    </ul>
                </div>

            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function () {
        $("#paymodify").click(function () {
            if(!$("#payPwd").is(':visible')){
                $('#payPwd').show(300);
            }else{
                $('#payPwd').hide(300);
            }

        });
        $("#loginmodify").click(function () {
            if(!$("#loginPwd").is(':visible')){
                $('#loginPwd').show(300);
            }else{
                $('#loginPwd').hide(300);
            }

        });
        $("#mobileApprove").click(function () {
            layer.open({
                type: 2,
                title: false,
                shadeClose: true,
                scrollbar:false,
                shade: 0.8,
                area: ['500px;', '500px'],
                content: '${path}/member/auth/toApprove?type=mobile'
            });
        });
        $("#emailapprove").click(function () {
            layer.open({
                type: 2,
                title: false,
                shadeClose: true,
                scrollbar:false,
                shade: 0.8,
                area: ['500px;', '400px'],
                content: '${path}/member/auth/toApprove?type=email'
            });
        });

        $("#auth_id").click(function () {
            layer.open({
                type: 2,
                title: false,
                shadeClose: true,
                scrollbar:false,
                shade: 0.8,
                area: ['700px;', '700px'],
                content: '${path}/member/auth'
            });
        });
    });

    layui.use(['form','layer'], function(){
        var form = layui.form(), $=layui.jquery, layer = layui.layer;
        form.on('submit(MainForm)', function(data){
            var index = layer.load();
            ajax({
                url:"${path}/member/ucenter/modifyLoginPassword",
                data: data.field,
                success: function(result){
                    layer.msg(result.content,function() {
                        location.reload();
                    });
                    layer.close(index);
                },
                complete:function(){
                    layer.close(index);
                },error:function(){
                    layer.close(index);
                }


            });
            return false;
        });
        form.on('submit(paypassForm)', function(data){
            var index = layer.load();
            ajax({
                url:"${path}/member/ucenter/modifyPayPassword",
                data: data.field,
                success: function(result){
                    layer.msg(result.content,function() {
                        location.reload();
                    });
                    layer.close(index);
                },
                complete:function(){
                    layer.close(index);
                },error:function(){
                    layer.close(index);
                }

            });
            return false;
        });


    });
</script>
[#include "/customer/include/footer.ftl"]

</body>
</html>